package com.sto.stoapp.status;

import com.sto.stoapp.http.BaseMessage;

import java.util.ArrayList;
import java.util.List;

public class OperateEnumTable {
	public static List<EnumTableNames> getSaleTables() {
		List<EnumTableNames> tableNames = new ArrayList<EnumTableNames>();
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_RECEIVE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_SIGN);
		tableNames.add(EnumTableNames.STATUS_TABLE_PROBLEM);
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_ORDER_EXTRACT);
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_ORDER_BACK);
		tableNames.add(EnumTableNames.STATUS_TABLE_SERVICE_SMS);
		return tableNames;
	}

	public static List<EnumTableNames> getScannerTables() {
		List<EnumTableNames> tableNames = new ArrayList<EnumTableNames>();
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_RECEIVE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_REACHPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_JOIN_SCAN);
		tableNames.add(EnumTableNames.STATUS_TABLE_PROBLEM);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_ASSIGNPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_STAY_WAREHOURSE);
		tableNames.add(EnumTableNames.STATUS_TABLE_BAGGINGADNSENDPIECE);
		// tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_BAGGING_OPERATE);
		// tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_LEAD_SEALING_OPERATE);
		tableNames.add(EnumTableNames.STATUS_TABLE_LOADCAR_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SEND_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_RECEIVE_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_SERVICE_SMS);
	

		return tableNames;

	}

	public static List<EnumTableNames> getAviationTables() {
		List<EnumTableNames> tableNames = new ArrayList<EnumTableNames>();
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PICKER_PACKET);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_TO_PIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_SEND);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PROBLEM);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_STAY_WAREHOURSE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_PACKET_SEND);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_SEND_BAG);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_ARRIVED_BAG);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_LOADCAR_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SEND_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_RECEIVE_CAR);

		return tableNames;

	}

	public static List<EnumTableNames> getAviationScanTables() {
		List<EnumTableNames> tableNames = new ArrayList<EnumTableNames>();
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_TO_PIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_SEND);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PROBLEM);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_STAY_WAREHOURSE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_PACKET_SEND);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_SEND_BAG);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_ARRIVED_BAG);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_LOADCAR_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SEND_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_RECEIVE_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PACKAGE_OPERATE);
		return tableNames;

	}

	public static List<EnumTableNames> getAviationPickerTables() {
		List<EnumTableNames> tableNames = new ArrayList<EnumTableNames>();
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PICKER_PACKET);
		return tableNames;

	}

	public static List<EnumTableNames> getCenterTables() {
		List<EnumTableNames> tableNames = new ArrayList<EnumTableNames>();
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_REACHPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_PROBLEM);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_STAY_WAREHOURSE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_BAGGINGADNSENDPIECE);

		// tableNames.add(EnumTableNames.STATUS_CENTER_TABLE_BAGGING_OPERATE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_LOADCAR_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_SEND_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_RECEIVE_CAR);

		return tableNames;

	}

	public static List<EnumTableNames> getAllTables() {
		List<EnumTableNames> tableNames = new ArrayList<EnumTableNames>();
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_RECEIVE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_SIGN);
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_ORDER_EXTRACT);
		tableNames.add(EnumTableNames.STATUS_TABLE_SALESMAN_ORDER_BACK);
		tableNames.add(EnumTableNames.STATUS_TABLE_SERVICE_SMS);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_RECEIVE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_REACHPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_ASSIGNPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_JOIN_SCAN);
		tableNames.add(EnumTableNames.STATUS_TABLE_STAY_WAREHOURSE);
		tableNames.add(EnumTableNames.STATUS_TABLE_BAGGINGADNSENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_LOADCAR_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SEND_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_RECEIVE_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_PROBLEM);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PICKER_PACKET);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_TO_PIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_SEND);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PROBLEM);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_STAY_WAREHOURSE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_PACKET_SEND);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_SEND_BAG);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SCAN_ARRIVED_BAG);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_LOADCAR_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_SEND_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_RECEIVE_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_AVIATION_PACKAGE_OPERATE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_REACHPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_STAY_WAREHOURSE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_BAGGINGADNSENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_LEAD_SEALING_OPERATE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_LOADCAR_SENDPIECE);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_SEND_CAR);
		tableNames.add(EnumTableNames.STATUS_TABLE_CENTER_RECEIVE_CAR);
		tableNames
				.add(EnumTableNames.STATUS_TABLE_SCANNING_LEAD_SEALING_OPERATE);
		tableNames.add(EnumTableNames.STATUS_CENTER_TABLE_BAGGING_OPERATE);
		tableNames.add(EnumTableNames.STATUS_TABLE_SCANNING_BAGGING_OPERATE);
		
		
		return tableNames;

	}

	public static List<EnumTableNames> getTablesByLogin(String type) {
		if (type.equals(BaseMessage.AVIATION_A_VERSION)) {
			return getAviationTables();
		} else if (type.equals(BaseMessage.CENTER_VERSION)) {
			return getCenterTables();

		} else if (type.equals(BaseMessage.SCANNER_VERSION)) {
			return getScannerTables();
		} else if (type.equals(BaseMessage.SALES_VERSION)) {
			return getSaleTables();
		} else {
			return getAllTables();
		}
	}
}
